package com.ajie.model;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * @author: ajie
 * @createTime: 2024-06-22 18:21
 */
@Data
@Schema(description = "分页请求入参")
public class PageParams<T> {

    @Schema(description = "页码")
    private int pageNo;

    @Schema(description = "页大小")
    private int pageSize;

    @Schema(description = "请求参数")
    private T params;

    @Schema(hidden = true)
    public Page<T> getPage() {
        return new Page<>(pageNo, pageSize);
    }

}
